/*
 * Copyright 2009 SHOP.COM
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.shop.opensocial.mediated.types;

import java.util.Locale;

/**
 * @author Jordan Zimmerman
 */
public interface GadgetContextMediator
{
	/**
	 * Return a parameter from the request
	 *
	 * @param name name of the parameter
	 * @return value.
	 */
	public String getParameter(String name);

	/**
	 * Return the Locale of the request
	 *
	 * @return locale
	 */
	public Locale getLocale();

	/**
	 * Return true if the cache should be ignored
	 *
	 * @return true/false
	 */
	public boolean getIgnoreCache();

	/**
	 * Return the request Host
	 *
	 * @return host
	 */
	public String getHost();

	/**
	 * Return the request's client IP
	 *
	 * @return IP
	 */
	public String getUserIp();

	/**
	 * Return true for debug mode
	 *
	 * @return true/false
	 */
	public boolean getDebug();

	/**
	 * Return which view to display
	 *
	 * @return view
	 */
	public String getView();

	/**
	 * @return The module id for this request.
	 */
	public int getModuleId();

	/**
	 * Return user prefs
	 *
	 * @return prefs
	 */
	public UserPrefsMediator getUserPrefs();

	/**
	 * Return this request's token
	 *
	 * @return token
	 */
	public SecurityTokenMediator getToken();

	/**
	 * Return the URL to the gadget's main XML
	 *
	 * @return URL
	 */
	public String	getGadgetURL();
}
